<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta http-equiv="X-UA-Compatible" content="ie=edge"/>
    <title>IT服务</title>
    <link rel="shortcut icon" href="favicon.jpg"/>
    <link rel="stylesheet" href="3rd/element-ui@2.13.2/lib/theme-chalk/index.css"/>
    <link rel="stylesheet" href="css/app.css"/>
    <link rel="stylesheet" href="css/reset.css"/>
    <style>
        .el-input {
            width: 160px;
        }
        .el-select { width : 160px; }

        * {
            cursor: initial;
        }

        .awards,
        .members {
            width: 95%;
            margin: 40px auto;
        }


        h1 {
            font-size: 20px;
            text-align: left;
            line-height: 1.5;
            margin-bottom: 20px;
        }

        h1 span {
            font-size: 16px;
        }

        a {
            text-decoration: underline;
            cursor: pointer;
        }
        .el-header, .el-footer {
            background-color: #ffffff;
            color: #000000;
            text-align: center;
            line-height: 30px;
        }

        .el-aside {
            background-color: #ffffff;
            color: #ffffff;
            text-align: center;
            line-height: 200px;
        }

        .el-main {
            background-color: #ffffff;
            color: #ffffff;
            text-align: center;
            /*line-height: 160px;*/
        }
        .avatar-uploader .el-upload {
            border: 1px dashed #d9d9d9;
            border-radius: 6px;
            cursor: pointer;
            position: relative;
            overflow: hidden;
        }
        .avatar-uploader .el-upload:hover {
            border-color: #409EFF;
        }
        .avatar-uploader-icon {
            font-size: 28px;
            color: #8c939d;
            width: 178px;
            height: 178px;
            line-height: 178px;
            text-align: center;
        }
        .avatar {
            width: 178px;
            height: 178px;
            display: block;
        }
    </style>
</head>
<body>
<div id="app" v-cloak>
    <div class="awards">
        <el-form :model="process" :rules="rules" ref="process" label-width="100px" class="demo-ruleForm">
            <el-form-item label="问题类型" prop="questionType">
                <template>
                    <el-select v-model="process.questionType" filterable >
                        <el-option
                                v-for="item in question"
                                :key="item.id"
                                :label="item.question"
                                :value="item.id">
                        </el-option>
                    </el-select>
                </template>
            </el-form-item>

            <el-form-item label="标题" prop="subject">
                <label slot="label">标题&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
                <el-input v-model="process.subject" style="width: 160px;" ></el-input>
            </el-form-item>

            <el-form-item label="内容" prop="content">
                <label slot="label">内容&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
                <el-input type="textarea" v-model="process.content"></el-input>
            </el-form-item>

            <el-form-item label="提出人" >
                <label slot="label">提出人&nbsp;&nbsp;&nbsp;</label>
                <template>
                    <el-select v-model="process.proposer" filterable>
                        <el-option
                                v-for="item in user"
                                :key="item.staff_num"
                                :label="item.nameChi"
                                :value="item.nameChi">
                        </el-option>
                    </el-select>
                </template>
            </el-form-item>

            <div v-if="process.questionType===2||process.questionType===4">
                <el-form-item label="单位主管" prop="approve1">
                    <label slot="label">单位主管</label>
                    <template>
                        <!--                        <el-select v-model="process.proposer" filterable allow-create>-->
                        <el-select v-model="process.approve1" filterable>
                            <el-option
                                    v-for="item in user"
                                    :key="item.staff_num"
                                    :label="item.nameChi"
                                    :value="item.nameChi">
                            </el-option>
                        </el-select>
                    </template>
                </el-form-item>

                <el-form-item label="部门主管"  prop="approve2">
                    <label slot="label">部门主管</label>
                    <template>
                        <el-select v-model="process.approve2" filterable>
                            <el-option
                                    v-for="item in user"
                                    :key="item.staff_num"
                                    :label="item.nameChi"
                                    :value="item.nameChi">
                            </el-option>
                        </el-select>
                    </template>
                </el-form-item>
            </div>


            <el-form-item label="附件上传" >
                <el-upload
                        class="upload-demo"
                        action="/upload"
                        :on-change="handleChange"
                        :file-list="process.fileList">
                    <el-button size="small" type="primary">点击上传</el-button>
                    <!--                    <div slot="tip" class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div>-->
                </el-upload>

            </el-form-item>

            <el-form-item label="上传图片" prop="questionPhoto" >
                <el-upload
                        class="avatar-uploader"
                        action="/upload"
                        accept=".jpg,.jpeg,.png"
                        :show-file-list="false"
                        :on-success="handleAvatarSuccess"
                        :before-upload="beforeAvatarUpload">
                    <img v-if="imageUrl" :src="imageUrl" class="avatar">
                    <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                </el-upload>
            </el-form-item>


            <el-form-item>
                <!--                <el-tooltip effect="light" content="日常需求不需要审批，系统需求需要部门主管进行审批" placement="top-start">-->
                <el-button type="primary" :disabled="isClicked" @click="submitProcess('process')">提交</el-button>
                <!--                </el-tooltip>-->
                <!--                <el-tooltip effect="light" content="需要部门主管进行审批的需求" placement="top-start">-->
                <!--                    <el-button type="primary" style="background-color: #e6a23c"  @click="submitProcess1('process')">系统需求</el-button>-->
                <!--                </el-tooltip>-->
                <el-button @click="resetForm('process')">重置</el-button>
            </el-form-item>
        </el-form>
    </div>
</div>
<script src="3rd/polyfill.min.js"></script>
<script src="3rd/vue.min.js"></script>
<script src="3rd/element-ui@2.13.2/lib/index.js"></script>
<script src="3rd/axios.min.js"></script>
<script src="js/util.js"></script>
<script src="js/create.js"></script>
</body>
</html>


